package com.kugou.miniapp.utils;

public class ResponseData<T> {
    private int code;
    private String msg;

    public static ResponseData genSuccess(Object t){
        ResponseData responseData = new ResponseData();
        responseData.setMsg("成功");
        responseData.setCode(1);
        responseData.setResData(t);
        return responseData;
    }

    @Override
    public String toString() {
        return "ResponseData{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", resData=" + resData +
                '}';
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getResData() {
        return resData;
    }

    public void setResData(T resData) {
        this.resData = resData;
    }

    private T resData;
}
